﻿<Page xmlns:ads="using:Microsoft.Advertising.WinRT.UI" 
    x:Class="ParentingTrackerApp.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:ParentingTrackerApp"
    xmlns:converters="using:ParentingTrackerApp.Converters"
    xmlns:views="using:ParentingTrackerApp.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" SizeChanged="MainPageOnSizeChanged">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Resources/Base.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition x:Name="ClockRow"/>
            <RowDefinition/>
            <RowDefinition x:Name="AdsRow" Height="250"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition x:Name="AdsCol" Width="0"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <TextBlock Grid.Row="0" Grid.Column="0" Name="Clock" HorizontalAlignment="Left" Margin="5,0,0,0"
            FontSize="36" Text="{Binding Time, Mode=OneWay, Converter={StaticResource DateTimeToStringConverter}}"></TextBlock>
        <Pivot Grid.Row="1" Grid.Column="0" DataContext="{Binding Central}" Name="MainPivot"
               SelectionChanged="PivotOnSelectionChanged">
            <PivotItem Header="Track">
                <views:TrackingView/>
            </PivotItem>
            <PivotItem Header="Customize">
                <views:CustomizingView/>
            </PivotItem>
            <PivotItem Header="Export">
                <views:ExportView/>
            </PivotItem>
        </Pivot>
        <ads:AdControl Grid.Row="2" Name="MyAds" Width="300" Height="250"
                                     AdUnitId="267217" ApplicationId="6280a407-b64e-431b-b032-c97dac77cae7"/>
    </Grid>
</Page>
